<template>
  <div class="app-container">
    <el-card>
      <div slot="header">
        <span>代码生成</span>
      </div>
      <div class="filter-container">
        <el-form :inline="true">
          <el-form-item label="表名称">
            <el-input v-model="queryParams.tableName" placeholder="请输入表名称" />
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="handleQuery">查询</el-button>
          </el-form-item>
        </el-form>
      </div>
      <el-table :data="[]" style="width: 100%">
        <el-table-column prop="tableName" label="表名称" />
        <el-table-column prop="tableComment" label="表描述" />
        <el-table-column prop="createTime" label="创建时间" />
        <el-table-column prop="updateTime" label="更新时间" />
        <el-table-column label="操作" width="200" align="center">
          <template slot-scope="{row}">
            <el-button size="mini" type="success" @click="handleGenCode(row)">生成代码</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  name: 'Gen',
  data() {
    return {
      queryParams: {
        tableName: ''
      }
    }
  },
  methods: {
    handleQuery() {
      // 处理查询
    },
    handleGenCode(row) {
      // 处理生成代码
    }
  }
}
</script>

<style lang="scss" scoped>
.app-container {
  padding: 20px;
  
  .filter-container {
    padding-bottom: 20px;
  }
}
</style> 